// ================================START====================================
// Template generated from		FRAMEWORKIVY CODE GENERATOR
// Generator Version:			<1.0.0.0>
// Template Creation Time:		<Saturday, 13 August, 2016   12:39:28 AM>
// Template Modification Time:	<Sunday, 4 September, 2016   12:40:01 AM>
// Code Generation Time:		<Monday, 12 September, 2016   10:01:47 PM>
// Workstation ID:				<PRAVESH>
// Current system User ID:		<pravesh>
// Entity/Table Name:			<ContentDataMaster>
// ModuleName:			        <ContentManagement>
// Description:					<CSharp Class For Entity Dao Unit Test>
// Template File:				<IvyGodeGenDefaultTemplate V1.1.xml>

// Please modify the generated code as per requirement.
// This code generator is just to speed up the stereo type codes
// Complex logic needs to be modified manually.

// =========================================================================
// If Code has been MANUALLY MODIFIED then set below line to TRUE
// CODE MANUALLY MODIFIED = FALSE
// =========================================================================

using System;

//This Class specific System namespaces
using Microsoft.VisualStudio.TestTools.UnitTesting;

//This Class Specific IvyFramework namespaces
using Ivy.Common.Framework.Base;
using Ivy.Common.Framework.DataAccess;
using Ivy.Common.Framework.GeneralUtility;

using Ivy.ContentManagement.Entity;
using Ivy.ContentManagement.DataAccess;

namespace Ivy.ContentManagement.UnitTest
{
    [TestClass]
    public class ContentDataMasterDaoUnitTest
    {
        [TestMethod]
        public void ContentDataMasterInsertTestMethod()
        {
            ContentDataMaster _tempContentDataMaster = new ContentDataMaster();
            ContentDataMasterDao _ContentDataMasterDao = new ContentDataMasterDao();

            //Auto Generated attribute should not be supplied from outside.
            //_tempContentDataMaster.ContentKey = ???; This is Auto Generated attribute.

            _tempContentDataMaster.ContentCode = "TEST ContentCode Not Unique" ;
            _tempContentDataMaster.ContentName = "TEST ContentName Not Unique" ;
            //Foreign Key attribute should have valid values from their respective parent tables/entities
            _tempContentDataMaster.ContentTypeKey = 9999; //Not Unique Key
            _tempContentDataMaster.ContentStatus = 9999; //Not Unique Key
            _tempContentDataMaster.ContentPublicationStartDate = DateTime.Now; //Not Unique Key
            _tempContentDataMaster.ContentPublicationEndDate = DateTime.Now; //Not Unique Key
            _tempContentDataMaster.ContentHtmlData = "TEST ContentHtmlData Not Unique" ;
            _tempContentDataMaster.ContentMetaTagKeyword = "TEST ContentMetaTagKeyword Not Unique" ;
            _tempContentDataMaster.ContentMetaTagDescription = "TEST ContentMetaTagDescription Not Unique" ;
            _tempContentDataMaster.ContentTotalDownloads = 9999; //Not Unique Key
            _tempContentDataMaster.ContentTotalLikes = 9999; //Not Unique Key
            _tempContentDataMaster.ContentTotalViews = 9999; //Not Unique Key

            _tempContentDataMaster.Sys_CreatedByID = "1";
            _tempContentDataMaster.Sys_DeleteType = DeleteType.SoftDeleteOnly;
            _tempContentDataMaster.Sys_IsDeleted = false;
            _tempContentDataMaster.Sys_OrganizationID = -1;

            Assert.IsTrue(_ContentDataMasterDao.Insert(_tempContentDataMaster));
        }

        [TestMethod]
        public void ContentDataMasterUpdateTestMethod()
        {
            ContentDataMaster _tempContentDataMaster = new ContentDataMaster();
            ContentDataMasterDao _ContentDataMasterDao = new ContentDataMasterDao();

            //Please edit and provide a valid value for GetByPrimaryKey() parameter
            _tempContentDataMaster = _ContentDataMasterDao.GetByPrimaryKey(int_ContentKey); 

            _tempContentDataMaster.ContentCode = "TEST ContentCode Not Unique" ;
            _tempContentDataMaster.ContentName = "TEST ContentName Not Unique" ;
            //Foreign Key attribute should have valid values from their respective parent tables/entities
            _tempContentDataMaster.ContentTypeKey = 9999; //Not Unique Key
            _tempContentDataMaster.ContentStatus = 9999; //Not Unique Key
            _tempContentDataMaster.ContentPublicationStartDate = DateTime.Now; //Not Unique Key
            _tempContentDataMaster.ContentPublicationEndDate = DateTime.Now; //Not Unique Key
            _tempContentDataMaster.ContentHtmlData = "TEST ContentHtmlData Not Unique" ;
            _tempContentDataMaster.ContentMetaTagKeyword = "TEST ContentMetaTagKeyword Not Unique" ;
            _tempContentDataMaster.ContentMetaTagDescription = "TEST ContentMetaTagDescription Not Unique" ;
            _tempContentDataMaster.ContentTotalDownloads = 9999; //Not Unique Key
            _tempContentDataMaster.ContentTotalLikes = 9999; //Not Unique Key
            _tempContentDataMaster.ContentTotalViews = 9999; //Not Unique Key

            _tempContentDataMaster.Sys_ModifiedByID = "1";

            Assert.IsTrue(_ContentDataMasterDao.Update(_tempContentDataMaster));
        }

    }
}


